package com.maya.medicalwastes.util;

import java.text.DecimalFormat;

/**
 * *
 */
public class FormatUtilA {
    public static String getObjectEmpty(String formatStr, String defaultStr) {
        if (formatStr == null) {
            return defaultStr;
        }
        if ("".equalsIgnoreCase(formatStr.trim())) {
            return defaultStr;
        }

        return formatStr;
    }

    /**
     * DecimalFormat转换最简便
     */
    public static String numbFormat(double numb) {
        DecimalFormat    df   = new DecimalFormat("######0.00");
        System.out.println(df.format(numb));
        return df.format(numb);

    }

}
